#ifndef AUDIOSTREAMDECODER_H
#define AUDIOSTREAMDECODER_H

#include <QThread>
#include <QDebug>

#include <QAudioOutput>
#include <QAudioFormat>
#include <QAudioDeviceInfo>
#include <QTimer>
#include <QDataStream>
#include <QIODevice>

class AudioStreamDecoder : public QThread
{
    Q_OBJECT
public:
    explicit AudioStreamDecoder(QObject *parent = 0);
    void run();
    void play(QByteArray data);

private:
    QAudioOutput *audioOutput = 0;
    QIODevice *outputDevice = 0;
    QByteArray playStack;

signals:

public slots:
    void outputStateChanged(QAudio::State);

};

#endif // AUDIOSTREAMDECODER_H
